Release 10.1A: OpenEdge Development:
Programming Interfaces
XML documents
XML documents are made up of two parts:
- The prolog contains optional information such as the XML version the document conforms to, information about the character encoding used to encode the contents of the document, and a document type definition (DTD) which describes the grammar and vocabulary of the document. A more modern way to describe XML grammar and vocabulary is called an XML Schema. XML Schema are usually stored in external files and the prolog can contain a reference to an XML Schema file instead of or in addition to a DTD.
- The body may contain elements, entity references, and other markup information.
DTDs are rules that define the elements that can exist in a particular document or group of documents, and the relationships among the various elements. A DTD can be part of the content of an XML document or can be separate from it and referred to by the documents. Here is an example of a DTD:
Elements represent the logical components of documents. They can contain data or other elements. For example, a customer element can contain a number of column (field) elements and each column element can contain one data value. Here is an example of an element:
Elements can have additional information called attributes attached to them. Attributes describe properties of elements. Here is an example of an element with an attribute,
emp-num:
Here is an example of elements that contain other elements:
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |